<?php
/**
 * Created by PhpStorm
 * User: whh
 * Date: 2022/7/28
 * Time: 16:02
 */

namespace app\common\model;
use app\backstage\model\ManagerUser;
use think\Model;

class Banner extends Model
{
    use Common;

    protected $table = 'quick_banner';

    public function novel()
    {
        return $this->hasOne(Novel::class, 'id', 'novel_id')->field("id,title,freq_id,class_id,scale,in_shelf");
    }

    public function managerUser()
    {
        return $this->hasOne(ManagerUser::class, 'id', 'agent_id')->field("id,account");
    }

    public function activity()
    {
        return $this->hasOne(RechargeActivity::class, 'id', 'activity_id')->field("id,title");
    }

}